import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/About",
    name: "About",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/About.vue"),
  },
  {
    path: "/Detail",
    name: "Detail",
    component: () => import("../views/Detail.vue"),
  },
  {
    path: "/Contact",
    name: "Contact",
    component: () => import("../views/Contact.vue"),
  },
  {
    path: "/Login",
    name: "Login",
    component: () => import("../views/Login.vue"),
  },
  {
    path: "/Release",
    name: "Release",
    component: () => import("../views/Release.vue"),
  },
  {
    path: "/userCenter",
    name: "userCenter",
    component: () => import("../views/userCenter.vue"),
  },
  {
    path: "/Search",
    name: "Search",
    component: () => import("../views/Search.vue"),
  },
  {
    path: "/Header",
    name: "Header",
    component: () => import("../components/Header.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
